Skip to content

feat(backend-cpu): Panama SIMD Q6_K SPI kernel; route Q6_K via the registry#720

Merged
michalharakal merged 1 commit into
developfrom
feature/718-panama-q6k
Jun 8, 2026
Merged

feat(backend-cpu): Panama SIMD Q6_K SPI kernel; route Q6_K via the registry#720
michalharakal merged 1 commit into
developfrom
feature/718-panama-q6k

Conversation

@michalharakal

Copy link
Copy Markdown
Contributor

Closes #718.

Brings Q6_K in line with Q4_K/Q5: it now resolves a SIMD kernel through the KernelProvider registry instead of the legacy DefaultCpuOpsJvm intercept — the last 🚧 from the eager backends & kernels mindmap.

Changes

  • New PanamaVectorQ6_KMatmulKernel (jvmMain, block-major): reuses the existing SIMD Q6_K block dequant (JvmQuantizedVectorKernels.dequantQ6_KBlock, now internal) into a 256-element scratch + a Vector-API FMA dot. Wired into PanamaVectorKernelProvider.matmulQ6K().
  • Retired the legacy JVM intercept: removed the is Q6_KTensorData matmul branch and the Q6_K lazy-transpose branch from DefaultCpuOpsJvm, so Q6_K flows through the unified DefaultCpuOpsBase registry dispatch (block-major, shared with Native). matmulQ6_KVec is kept only as a tested reference (Q6KMatmulTest); dequantQ6_KBlock is the shared helper.
  • Matrix regenerates to Q6_K JVM = panama-vector (KernelSupportMatrixTest's declared Panama set gains Q6_K) — docs/kernel-support-matrix.md updated.

Verification

  • PanamaVectorQ6KParityTest (Panama vs Scalar Q6_K, within FMA tolerance) ✅
  • PackedMatmulDispatchTest gains a Q6_K case — green on jvmTest AND linuxX64Test
  • Full backend-cpu jvmTest suite passes (no regression from retiring the intercept) ✅
  • apiDump regenerated ✅

Native-FFM Q6_K (and Q5) remains the separate gap in #708 / SKaiNET-transformers#170; this PR is the Panama SIMD SPI kernel only.

🤖 Generated with Claude Code

…gistry

Closes #718. Brings Q6_K in line with Q4_K/Q5: it now resolves a SIMD kernel
through the KernelProvider registry instead of the legacy DefaultCpuOpsJvm intercept.

- New PanamaVectorQ6_KMatmulKernel (jvmMain, block-major): reuses the existing SIMD
  Q6_K block dequant (JvmQuantizedVectorKernels.dequantQ6_KBlock, now internal) into a
  256-element scratch + a Vector-API FMA dot. Wired into PanamaVectorKernelProvider.matmulQ6K().
- Retire the JVM-only legacy intercept: removed the `is Q6_KTensorData` matmul branch and
  the Q6_K lazy-transpose branch from DefaultCpuOpsJvm, so Q6_K flows through the unified
  DefaultCpuOpsBase registry dispatch (block-major, shared with Native). The legacy
  JvmQuantizedVectorKernels.matmulQ6_KVec is kept only as a tested reference (Q6KMatmulTest);
  dequantQ6_KBlock is now the shared helper.
- docs/kernel-support-matrix.md regenerates to `Q6_K JVM = panama-vector`
  (KernelSupportMatrixTest's declared Panama set gains Q6_K).

Tests: PanamaVectorQ6KParityTest (Panama vs Scalar Q6_K) + PackedMatmulDispatchTest gains a
Q6_K case — green on jvmTest AND linuxX64Test. Full backend-cpu jvmTest passes (no regression
from retiring the intercept); apiDump regenerated.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Jun 8, 2026

Copy link
Copy Markdown

📖 Documentation Preview

The documentation has been built successfully for this PR.

Generated Files:

  • Operator documentation: docs/modules/operators/_generated_/
  • JSON schema output: operators.json

Artifacts:

  • Download the documentation-preview-720 artifact to view the complete documentation locally.

This comment will be updated automatically when the PR is updated.

@michalharakal michalharakal merged commit fc3885c into develop Jun 8, 2026
13 checks passed
@michalharakal michalharakal deleted the feature/718-panama-q6k branch June 8, 2026 12:21
michalharakal added a commit that referenced this pull request Jun 9, 2026
docs: refresh eager-kernels mindmap after Panama Q6_K (#720)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Panama SIMD Q6_K SPI kernel (route Q6_K through the kernel registry, not the legacy intercept)

1 participant